﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
    public partial class EmployeeBLL:DAL.DatabaseObject
    {
        public static EmployeeBLL CreateInstant()
        {
            return new EmployeeBLL();
        }
        public EmployeeDAL GetEmployeByID(int ID)
        {
            EmployeeDAL item = new EmployeeDAL();
            SqlParameter[] ArrPara = { new SqlParameter("@ID", SqlDbType.Int) };
            ArrPara[0].Value = ID;
            DataTable dt = ReturnDataTable_WithParameter("sp_GetEmployeeBy", ArrPara);
            item.ID = int.Parse(dt.Rows[0]["ID"].ToString());
            item.Name = dt.Rows[0]["Name"].ToString();
            return item;
        }
    }
}
